#ifndef SOUNDSAMPLE_H
#define SOUNDSAMPLE_H

#include <iostream>
#include <QString>
#include <QFile>
#include <QDataStream>
#include <fstream>
#include <sstream>
#include <string>

class IFileReadBehavior;

// Abstract baseclass describing the general
// SoundSample structure
class SoundSample
{

public:

    // Constructor and destructor
    // --------------------------------------------------------------
    SoundSample ( QString filepath );
    ~SoundSample ();

    // Getters and Setters section
    // --------------------------------------------------------------
    QString getFilepath() const { return this->mFilepath; }
    void setFilepath(QString filepath) { this->mFilepath = filepath; }

    QString getFilename() const { return this->mFilename; }
    void setFilename(QString filename) { this->mFilename = filename; }

    QString getFileformat() const { return this->mFileformat; }
    void setFileformat(QString fileformat) { this->mFileformat = fileformat; }

    QString getDescription() const { return this->mDescription; }
    void setDescription(QString desc) { this->mDescription = desc; }

    QString getChannels() const { return this->mChannels; }
    void setChannels(QString ch) { this->mChannels = ch; }

    QString getBitdepth() const { return this->mBitdepth; }
    void setBitdepth(QString bitdepth) { this->mBitdepth = bitdepth; }

    QString getSamplerate() const{ return this->mSamplerate; }
    void setSamplerate(QString sr) { this->mSamplerate = sr; }
	
	QString getFilesize() const { return this->mFilesize; }
	void setFilesize(long fs); // implementation in .cpp file
	
	QString getLength() const { return this->mLength;}
	void setLength(int length); // implementation in .cpp file
    // --------------------------------------------------------------

    // Strategy Pattern
    // --------------------------------------------------------------
    IFileReadBehavior* getFileReadBehavior() { return this->readBehavior; }
    void setFileReadBehavior (IFileReadBehavior* frb){ this->readBehavior = frb; }
	
	// set and get Waveform Data
	// --------------------------------------------------------------
	void setPlotDataUp ( int* _plotDataUp ){ this->plotDataUp = _plotDataUp; }
	void setPlotDataDown ( int* _plotDataDown ) { this->plotDataDown = _plotDataDown; }
	int* getPlotDataUp () const { return this->plotDataUp; }
	int* getPlotDataDown() const { return this->plotDataDown; }

private:
    QString mFilepath;
    QString mFilename;
    QString mFileformat;
    QString mDescription;
    QString mChannels;
    QString mBitdepth;
    QString mSamplerate;
	QString mFilesize;
	QString mLength;

    IFileReadBehavior* readBehavior;
	int* plotDataUp;
	int* plotDataDown;

};

#endif // SOUNDSAMPLE_H
